#include "stm32f10x.h"     
#include "delay.h"
#include "key.h"
#include "led.h"
#include "pwm.h"
#include "oled.h"
#include "motor.h"
uint16_t i;
uint8_t keyCode;
int8_t speed;

int main()
{

OLED_Init();
MotorInit();
Key_Init();
OLED_ShowString(1,1,"speed:");
while(1)
{
	keyCode = Key_GetKeyCode();
	if(keyCode==1) 
	{
		speed+=10;
		if(speed>100) speed=-100;
		OLED_ShowSignedNum(1,7,speed,5);
	}
	MotorSetSpeed(speed);

}
}






















